#import "checkers_hash.h"

hash_t chZobristKeys[2][4][8] = {
    {
		{ 0x423db024, 0x2f792e46, 0x66f4e9d, 0x450a9d4b,
            0x4a01b6b8, 0x16a95c18, 0x2de755d, 0x634045c8
        },

		{ 0x4b020b43, 0x1b64d837, 0x5219907b, 0xb87125f,
            0x4232f065, 0x55d4bb21, -0xf927c2, 0x747ac90a
        },

		{ 0x280a5be1, 0x7896d93f, 0xa2f397d, 0x6f725585,
            0x39222a04, 0x6558f127, -0x75807c0, 0x2616742a
        },

		{ 0x16d88dda, 0x306303c5, -0xba7146e, 0x5af01e1f,
            0x148b8af6, 0x68432a7, 0x2a6f0a30, 0x660d7d67 
        }
    },
    {
		{ 0x60f4cc47, 0x51efed2, 0x1aeedb0d, 0x203ae785,
            0x74effe5, 0x21a66ee3, 0x32018f2d, 0x328aceb5
        },

		{ 0x2aec0d99, 0x7a1c0422, 0x2a833086, 0x20139843,
            0x48237bf7, 0x6343b213, 0x155cbdbe, 0x6b6d4d26
        },
    
		{ -0x4c8c8ba, 0x2e94d74e, 0x7a16ab8b, 0x27f38ea0,
            0x7f6ae572, 0x4015fcb9, 0x5b36b1dc, 0x3383fea9
        },
    
		{ 0xfa695ab, -0x3a18b67, 0x644a2c5a, 0x1fb111ab, 
            0x65e9858f, -0x518f003, 0x3e6e852f, 0x130c4430
        }/*,
    
		{ 0x462a686c, 0x75976660, 0x250533b2, 0x739bf0fa,
            0x626f9a29, 0x23269a69, 0x1eb7a0b, 0x5ba7ff0f 
        },
    
		{ 0x33c3f01b, 0x38296bcf, 0xc05a95d, -0x914f39e, 
            0x63ccb029, 0x678ca3de, -0xbbfdf14, 0x75583929
        }*/
    }
};

void chbIncrementalHash(CheckersBoard* board, CheckersPos* pos){
	int sqr, iswhite;
	sqr = pos->x+pos->y*(BOARD_W/2);
	iswhite = board->board[sqr] > 0;
	//board->hashvalue ^= chZobristKeys[iswhite][];
}
void chbTurnChangeHash(CheckersBoard* board){

}

